/* 导航组件样式 */
/* 固定导航栏 */
.nav-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: white;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease-in-out;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* 为固定导航腾出空间 */
 

/* 导航链接样式 */
.nav-link {
  position: relative;
  transition: color 0.2s ease-out, 
              border-color 0.2s ease-out,
              background-color 0.2s ease-out;
  will-change: color, border-color, background-color;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 活动链接指示器 */
.nav-link[aria-current="page"] {
  border-color: #3b82f6;
  color: #1f2937;
  font-weight: 500;
}

.dark .nav-link[aria-current="page"] {
  color: #ffffff;
}

/* 导航链接悬停效果 */
.nav-link:not([aria-current="page"]):hover {
  border-color: #d1d5db;
  transition-duration: 0.15s;
}

.dark .nav-link:not([aria-current="page"]):hover {
  border-color: #4b5563;
}

/* 移动端导航链接 */
.mobile-menu .nav-link {
  transition: border-color 0.2s ease-out,
              background-color 0.2s ease-out,
              color 0.2s ease-out;
}

.mobile-menu .nav-link[aria-current="page"] {
  background-color: rgba(59, 130, 246, 0.05);
  border-color: #3b82f6;
  color: #1f2937;
}

.dark .mobile-menu .nav-link[aria-current="page"] {
  background-color: rgba(59, 130, 246, 0.1);
  color: #ffffff;
}

.nav-link.active {
  font-weight: 600;
}

/* 移动端导航菜单 */
.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  transform: translateY(-10px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity, visibility;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

/* 用户菜单 */
.user-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity, visibility;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.user-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 通知徽章 */
.notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #ef4444;
  border: 2px solid white;
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
  .nav-container {
    background-color: #1f2937;
    border-bottom: 1px solid #374151;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  }
  
  .nav-link {
    color: #e5e7eb;
  }
  
  .nav-link:hover {
    color: #ffffff;
  }
  
  .nav-link.active {
    color: #ffffff;
    border-color: #3b82f6;
  }
  
  .notification-badge {
    border-color: #1f2937;
  }
}